home *** CD-ROM | disk | FTP | other *** search
- 1 print"[147]"
- 2 print spc(7)"c64time"
- 3 print spc(9)"by"
- 4 print spc(2)"isaac michalowski"
- 5 print spc(6)"12/09/83"
- 6 print " mod. for the c64/128"
- 7 print spc(9)"by"
- 8 print spc(2)"morton kevelson"
- 9 print spc(6)" 5/17/85"
- 10 forx=1to800:nextx
- 14 print"[147]"
- 15 dima$(6)
- 20 print "time set[146]"
- 25 print"24 hour format"
- 30 print"enter time in the"
- 35 print"following manner"
- 40 print"[158]hh=hours"
- 44 print"mm=miutes"
- 45 print"ss=seconds"
- 50 print"[158]hhmmss"
- 55 inputa$
- 56 ifmid$(a$,7,7)=>"0"then3050
- 60 if a$>"235959"goto3000
- 65 ti$=a$
- 70 print spc(8)"running"
- 120 sp(1)= 31 :sp(2)= 24
- 130 drt=37136:ddr=37138:dfl=37149:dcb=37148: rem for vic-20
- 135 rem: drt=56577:ddr=56579:dfl=56578:dcb=56576:rem for c-64/128
- 140 poke ddr,127
- 150 a=peek(dcb)and 15:rem for vic-20
- 155 rem: a=peek(dfl)or 4:rem for c-64/128
- 160 poke(dcb),160 or a:rem for vic-20
- 165 rem: poke(dfl),a:rem for c-64/128
- 170 rem: gosub 3110:rem for c-64/128
- 200 rem**strip time**
- 210 a$=left$(ti$,2)
- 220 a=val(a$)
- 230 rem**strip minutes**
- 240 b$=mid$(ti$,3,2)
- 250 b=val(b$)
- 260 z=0
- 261 t=0
- 265 if a<21 then z=1:goto330
- 266 t=0
- 270 if a=21 then a1=1:t=a:goto320
- 280 if a=22 then a1=2:t=a:goto320
- 290 if a=23 then a1=3:t=a:goto320
- 320 a=20
- 330 rem**check minutes**
- 340 if b=0 goto 1000
- 350 if b<10 then b1=b:b=0:goto1040
- 360 if b=50 then b=23:goto1080
- 370 if b>50 then b1=b-50:b=23:goto1040
- 380 if b=40 then b=22:goto1080
- 390 if b>40 then b1=b-40:b=22:goto1040
- 400 if b=30 then b=21:goto1080
- 410 if b>30 then b1=b-30:b=21:goto1040
- 420 if b>20 then b1=b-20:b=20:goto1040
- 430 goto 1080
- 1000 rem**top of hour**
- 1010 if t<21anda<21then sp(3)=a:sp(4)=29:sp(5)=33:n=3:goto2000
- 1020 sp(3)=a:sp(4)=a1:sp(5)=29:sp(6)=33:n=4:goto2000
- 1030 goto 2000
- 1040 rem**sound format minutes**
- 1050 if z=1 then sp(3)=a:sp(4)=27:sp(5)=b:sp(6)=b1:sp(7)=28:n=5:goto2000
- 1060 sp(3)=a:sp(4)=a1:sp(5)=27:sp(6)=b :sp(7)=b1:sp(8)=28:n=6
- 1070 goto 2000
- 1080 rem**sound format minutes10,20,30,40,50 only**
- 1090 if z=1 then sp(3)=a:sp(4)=27:sp(5)=b:sp(6)=28:n=4:goto 2000
- 1100 sp(3)=a:sp(4)=a1:sp(5)=27:sp(6)=b:sp(7)=28:n=5:goto 2000
- 2000 rem**speak!!**
- 2010 for x=1 to n+2
- 2020 if peek(drt)>127 goto 2020
- 2030 poke drt,sp(x)
- 2035 gosub3100
- 2040 next x
- 2050 rem**top of minute**
- 2060 c$=right$(ti$,2)
- 2070 c=val(c$)
- 2080 if c=00 goto 200
- 2090 goto 2060
- 3000 rem**error message**
- 3010 print"[147]time set is greater than 235959"
- 3030 fore=1to3500:nexte
- 3040 print"[147]":goto30
- 3050 print"[147]enter only 6 digits":goto3020
- 3100 rem poke dcb,peek(dcb)and251:rem for c-64/128
- 3110 rem poke dcb,peek(dcb)or4:rem for c-64/128
- 3120 rem return:rem for c-64/128
-